package com.yannuo.dao.Impl;

import com.yannuo.dao.EmpDao;
import com.yannuo.pojo.Emp;
import com.yannuo.util.SqlSessionUtil;
import org.apache.ibatis.session.SqlSession;

import javax.rmi.CORBA.Util;
import java.util.ArrayList;
import java.util.List;

public class EmpDaoImpl implements EmpDao {

    @Override
    public List<Emp> listEmps() {
        SqlSession sqlSession = SqlSessionUtil.getSqlSessionFactory().openSession();
        List<Emp> emps = sqlSession.selectList("emps.listEmps");

        return emps;
    }
}
